#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import itertools
codes = itertools.permutations(range(10), 8)

dictname = 'dict.txt'
with open(dictname) as fo:
    for code in codes:
        fo.write(code + '/n')